const app = getApp()

const { Api } = app.globalData

Page({
	data: {
		articles: {}
	},

	onLoad(){
		this.getArticles()
  },
  
  getArticles() {
      app.get(Api.article.list, {
      class_id: 1,
      page: 1,
      limit: 10
    }).then(res => {
      const {data} = res;
      console.log(data);
      res.code === 1 && this.setData({
        articles: data.articles
      })
    })
  }
})